#ifndef HD44780PARALLEL_SIMULATION_DATA_GENERATOR
#define HD44780PARALLEL_SIMULATION_DATA_GENERATOR

#include <AnalyzerHelpers.h>
#include <SimulationChannelDescriptor.h>
#include <string>
#include <vector>

class HD44780AnalyzerSettings;
class IDataGenerationCommand;
class IHD44780;

class HD44780SimulationDataGenerator
{
public:
	HD44780SimulationDataGenerator();
	~HD44780SimulationDataGenerator();

	void Initialize( U32 simulation_sample_rate, HD44780AnalyzerSettings* settings );
	U32 GenerateSimulationData( U64 newest_sample_requested, U32 sample_rate, SimulationChannelDescriptor** simulation_channel );



protected:
   	SimulationChannelDescriptorGroup            mSimulationData;
	std::vector< SimulationChannelDescriptor*>  mData;
	std::vector< U64 >                          mDataMasks;
	HD44780AnalyzerSettings*            mSettings;
    SimulationChannelDescriptor*                mClock;
    bool                                        mGenerateData;
    U64                                         SampleCount;
	U32                                         mSimulationSampleRateHz;
    std::vector< IDataGenerationCommand* >      mCommands;
    std::vector< IHD44780* >                    mGenerators;

protected:

    inline void CreateGenerators();
    inline void CallStaticInitializerForGenerators();
    inline void DeleteGenerators();

    inline void CreateCommands();
    inline void CallStaticInitializerForCommands();
    inline void DeleteCommands();

    inline void CreateSimulationChannelDescriptors();
    inline void GenerateData();

    
};
#endif //HD44780PARALLEL_SIMULATION_DATA_GENERATOR